package taskbase

import (
	"wtester/pkg/parabase"
)

/**
  @author: weicai
  @since: 2024/3/11
  @desc: 任务执行者
**/

type TaskInterface interface {
	Run(*map[string]string)
	GetWeight() int
	GetParameter() []parabase.TaskParamInterface
	HasRangeParam() bool // 判断任务是否包含范围参数
	GetName() string
}

func InitTask(name string, weight int, hasRangeP bool, para []parabase.TaskParamInterface) TaskInterface {
	return &TaskHttp{Name: name, Weight: weight, HasRangeP: hasRangeP, Parameter: para}
}
